/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;
import AO.Seeker;
import dbconnector.DBDriver;
import java.sql.PreparedStatement;
/**
 *
 * @author HONEY
 */
public class SeekerDAO 
{
    public static boolean  save(Seeker s)
    {
       try
        {     
         PreparedStatement pstmt = DBDriver.getPrepare("insert into seekerdetails values(?,?,?,?,?,?,?,?,?,?)");
         pstmt.setString(1, s.getFname());
         pstmt.setString(2, s.getLname());
         pstmt.setString(3, s.getDob());
         pstmt.setString(4, s.getGender());
         pstmt.setString(5, s.getEmail());
         pstmt.setString(6, s.getContact());
         pstmt.setString(7, s.getStatus());
         pstmt.setString(8, s.getAddress());
         pstmt.setString(9, s.getUsername());
         pstmt.setString(10, s.getPassword());
         int i=pstmt.executeUpdate();
         if(i==1)
             return true;
                
         
        }
          catch(Exception e){e.printStackTrace();}
       return false;
   }
    
}
